<template>
  <div></div>
</template>

<script setup lang="ts" name="WxLogin">
import { SET_TOKEN } from '@/utils/toke'
import { SET_USER } from '@/utils/user'
import { useRoute } from 'vue-router'

// 获取路由对象中携带的query参数
const route = useRoute()
// 持久化存储用户信息
SET_TOKEN(route.query.token as string)
SET_USER(route.query.name as string)
// 此路由组件代码执行：说明用户授权成功
// 隐藏重定向展示的页面
let html = document.querySelector('html') as HTMLElement
html.style.display = 'none'
</script>

<style scoped lang="scss"></style>
